<template>
  <div class="addshop">
      <el-form :model="form" label-width="100px">
      <div class="addtop">
        <el-form-item label="商品名称">
          <el-input v-model="form.name" />
        </el-form-item>
        <el-form-item label="商品价格">
          <el-input v-model="form.name" />
        </el-form-item>
        <el-form-item label="商品库存">
          <el-input v-model="form.name" />
        </el-form-item>
        <el-form-item label="商品库存">
          <el-input v-model="form.name" />
        </el-form-item>
        <el-form-item label="商品分类">
          <el-select v-model="form.region" placeholder="请选择商品分类">
            <el-option label="玩具" value="shanghai" />
            <el-option label="服饰" value="beijing" />
            <el-option label="零食" value="beijing" />
            <el-option label="手机" value="beijing" />
          </el-select>
        </el-form-item>
        <el-form-item label="上架状态">
          <el-radio-group v-model="form.resource" style="width:500px">
            <el-radio label="上架" />
            <el-radio label="下架" />
          </el-radio-group>
        </el-form-item>
        </div>
      <el-form-item label="商品简介">
        <el-input v-model="form.desc" type="textarea" />
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">确认</el-button>
        <el-button>取消</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'addshop',
  data() {
    return {
      form: {
        name: '',
        region: '',
        resource: '',
        desc: '',
      },
    }
  },
  methods: {
    /**
     * 处理用户登录
     */
    onSubmit() {
      this.$router.push('/configure/lunbo')       
    }
  }
}
</script>

<style lang="less" scoped>
.addshop {
  margin: 30px 100px 0 0;

  .addtop {
    margin-right: 700px;

    .el-select {
      width: 300px;
    }
  } 
}


</style>

